<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>webview</title>
  <style type="text/css">
    body{
      background: antiquewhite;
    }
    .btn {
      line-height: 40px;
      background: #cccccc;
      padding: 10px;
    }
  </style>
</head>
<body>
<h2>WebView</h2>
<div>
  <span>请输入要传递的值：</span>
  <input type="text" id="input">
</div>
<div id="btn">
  <span class="btn">点我</span>
</div>
<script type="text/javascript">
  var btnEle = document.getElementById("btn");
  var inputEle = document.getElementById("input");
  btnEle.addEventListener("click",function () {
    var string = inputEle.value;
    if (window.imoocLauncher) {
      imoocLauncher.setValue(string);
    }else {
      alert("imoocLauncher not found!");
    }
  });
  var remote = function(str){
    inputEle.value = str;
  }
</script>
</body>
</html>
